#GameWrapper {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform-origin: top center;
}

#TopMenu {
    position: relative;
    margin-top: -5px;
    top: 385px;
    left: -26.5px;
}

#InvalidGuessErrorDisplay {
    all: unset;
    position: absolute;
    align-items: center;
    height: 75px;
    padding: 5px;
    width: 180px;
    background-color: white;
    top: -52px;
    left: -72.5px;
    z-index: 1000;
    text-align: center;
    border-radius: 8px;
    border: solid 1.5px black;
    font-family: 'Roboto', sans-serif;
    font-weight: 200;
    font-size: 15.4px;
}

/* Styling the Opening and Close Buttons for the modal */ 

.HowToSearch p {
    font-family: 'Public Sans', sans-serif;
    font-weight: 700;
    font-size: 32px;
    margin-top: 10px;
}

#OpenTopButton1 {
    all: unset;
    position: relative;
    top: -370px;
    right: 243px;
    z-index: 2000;
    font-family: 'Anton';
    font-size: 15px ;
}

#CloseTopButton1 {
    all: unset;
    border: solid thin black;
    border-radius: 5px;
    padding: 5px;
    z-index: 2000;
    background-color: rgb(225, 225, 225);
}

.RulesSection {
    background-color: white;
    border-radius: 15px;
    position: absolute;
    width: 475px;
    height: 405px;
    z-index: 1000;
    top: -42px;
    left: 42%;
    transform: translate(-50%, -50%);
    text-align: center;
    opacity: 0;
    pointer-events: none;
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    font-size: 16px;
}

.RulesSection h1 {
    font-family: 'Public Sans', sans-serif;
    font-weight: 700;
    font-size: 32px;
}

.RulesSection li { 
    margin-bottom: 5px;
}

.RulesContainer.show .RulesSection {
    opacity: 1;
    pointer-events: auto;
}

/* The div element styling for the rulebook modal element */ 

#TopButtons1Section {
    position: absolute;
}

/* This is the styling for the how to play */ 

#OpenTopButton2 {
    all: unset;
    position: relative;
    top: -370px;
    right: 175px;
    z-index: 2000;
    font-family: 'Anton';
    font-size: 15px ;
}

#CloseTopButton2 {
    all: unset;
    border: solid thin black;
    border-radius: 5px;
    padding: 5px;
    z-index: 2000;
    position: relative;
    top: 315px;
    left: 49px;
    background-color: rgb(225, 225, 225);
}

#HowToPlayNextButton {
    all: unset;
    border: solid thin black;
    border-radius: 5px;
    padding: 5px;
    z-index: 2000;
    position: relative;
    background-color: rgb(225, 225, 225);
    top: 130px;
    left: 199px;
    font-size: 12px;
    text-align: center;
    height: 40px;
    width: 32px;
}

#HowToPlayBackButton {
    all: unset;
    border: solid thin black;
    border-radius: 5px;
    padding: 5px;
    z-index: 2000;
    position: relative;
    background-color: rgb(225, 225, 225);
    top: 130px;
    right: 288px;
    font-size: 12px;
    height: 40px;
    width: 32px;
    text-align: center;
}

.HowToSearch {
    background-color: white;
    background-size: 89.5%;
    background-position: 25.5px 8px;
    background-repeat: no-repeat;
    position: absolute;
    width: 475px;
    height: 475px;
    z-index: 1000;
    top: -33.5px;
    left: 36%;
    transform: translate(-50%, -50%);
    text-align: center;
    opacity: 0;
    pointer-events: none;
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    font-size: 16px;    
    clip-path: inset(0 0 20px 0 round 15px);
    border-radius: 15px;
}

#TopButtons2Section {
    position: absolute;
}

.HowToPlayContainer.show .HowToSearch {
    opacity: 1;
    pointer-events: auto;
}

/* This makes the dashes and letters green */

#CorrectPlacement .GreenDashLetter {
    color: green;
    position: relative; 
    top: 4px;           
    display: inline-block; 
}

#CorrectPlacement .GreenDash {
    color: green;
}

/* This makes winner/loser display appear in the center */

#CorrectPlacement .EndDisplay{
    color: black;
    position: relative; 
    top: 4px;           
    display: inline-block; 
}

/* Styling of the answer table */

#AnswerTable {
    padding-top: 42px;
    position: relative;
    right:10px;    
}

#AnswerGuesses {
    border-collapse: separate;
    border-spacing: 17.5px 0;
    margin-right: 10px;
    table-layout: fixed;
    width: 100%;
}

#AnswerGuesses td {
    border: solid 1px transparent;
    text-align: center;
    font-family: 'Oswald';
    font-size: 16 px ;
    letter-spacing: 0.3px;  
    white-space: nowrap;
    line-height: 18px;
    overflow: visible;
    width: 88px;
    height: 18px;
    background-color:transparent;
}

/* Styling Position of Letters Table */

#LetterPositition1 {
    margin-top: 8px;
}

#PositionTable #LetterPositition1, #LetterPositition2 {
    border-collapse: collapse;
    display: flex;
    justify-content: center;
    table-layout: fixed;
}

#PositionTable #LetterPositition1 td{
    width: 87px;
    height: 68px;
    padding: 0;
}

#PositionTable #LetterPositition2 td{
    width: 75px;
    height: 64.5px;
    padding: 0;
}

#LetterPositition2 {
    margin-top: -9.5px;
    margin-bottom: 5px;
}

/* Styling Letter Buttons */

button {
    height: 30px;
    width: 80px;
    background-color: rgb(55, 55, 55);
    border: solid thin black;
    color: white;
}

button:disabled {
    opacity: 1;
    cursor: default;
    background-color: rgb(55, 55, 55);
    border: solid thin black;
    color: white;
}

/* Styling of the part of the page containing the game */

#GameDisplay {
    margin-top: 6px;
    text-align: center;
    background-image: url('Images/Background1.png');
    background-repeat: no-repeat;
    background-position: center 35px;
    height: 755px;
    width: 545px;
    margin-right: 0.5px;
}

/* Styling of container of buttons */

#Keys {
    display: grid;
    grid-template-columns: repeat(7,1fr);
    gap: 10px;
    padding: 25px;
    justify-content: center;
    margin-top: 9px;
    transform: scale(0.86); 
    position: absolute;
    top: 577px;
}

body {
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Styling of the Word Length table */

#WordLengthTable {
    display: grid;
    justify-content: center;
    margin: 0;
    margin-top: -0.5px;
}

#WordLengthTable table {
    background-color: transparent;
    border-collapse: collapse;
}

#WordLengthTable td {
    border: solid transparent 1px;
    width: 107px;
    height: 20px;
    padding: 0;
    white-space: nowrap;
    line-height: 20px;
    overflow: visible;
    text-align: center;
    font-family: 'Oswald';
    font-size: 15px ;
}

/* Styling of the table where the shirt is */

#ShirtSection {
    display: grid;
    justify-content: center;
    margin: 0;
    margin-top: 5.7px;
    overflow: hidden;
}

#ShirtSection table {
    width: 280px;
    background-color: transparent;
    border-collapse: collapse;
    margin-bottom: -20px;
}

#ShirtSection td {
    border: solid 1px transparent;
    padding: 0;
}

/* Styling for the input */

#InputField {
    padding-top: 9px;
    padding-bottom: -2px;
    width: 95px;
    margin-right: 2px; 
    text-align: center;
    font-family: 'Teko';
    font-weight: 400;
    background: transparent;
    outline: none;
    border: none;
    caret-color: transparent;
}

/* Styling for the placement of green letters */

#WinLossConditionTable td{
    font-size: 20px;
    text-align: center;
    vertical-align: top;
    letter-spacing: 4px;
    border: solid 1px transparent;
    height: 45px;
    white-space: nowrap;
    line-height: 45px;
    overflow: visible;
    position: relative;
    top: -4px;
    margin-right: 30px;
}

#WinLossConditionTable {
    margin-top: 2px;
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
    table-layout: fixed;
    border-collapse: collapse;
}

#WinLossConditionTable #CorrectPlacement {
    width: 263px;
}

/* Styling for the numbers on the back of the shirt */

#NumberOnShirt img {
    padding-top: 9px;
    width: 43px;
    height: 74px;
    position: relative;
    justify-content: center;
    left: 1px;
}

/*New CSS */

#TopButtons3Section {
    position: absolute;
}

#OpenTopButton3 {
    all: unset;
    position: relative;
    top: -370px;    
    left: 202px;
    z-index: 2000;
    font-family: 'Anton';
    font-size: 15px ;
    width: 100px;
}

/*New Code*/

#LegalPage {
    position: fixed;
    inset: 0;
    background: white;
    z-index: 5000;
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
}

#LegalPage h1 {
    font-family: 'Anton';
    letter-spacing: 1px;
    font-size: 25px;
}

#LegalPage p,li{
    font-family: 'Public Sans';
    font-size: 15px;
}

#LegalPage button {
    background-color: none;
    all: unset;
    font-family: 'Anton';
    font-size: 20px ;
}

#LegalPage ul {
    padding-left: 25px;
}

#LegalPage li {
    line-height: 1.6;
}